Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ensure FIND_PACKAGE PythonInterp called before PythonLibs #479

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

markmcclain
Copy link

Upstream Cmake docs specify that PythonInterp should be called before
PythonLibs[1]. Inconsistency is possible when called with PythonLib first
in some environments.

[1] https://cmake.org/cmake/help/latest/module/FindPythonInterp.html

@markmcclain markmcclain changed the title Ensure FIND_PACKGE PythonInterp called before PythonLibs Ensure FIND_PACKAGE PythonInterp called before PythonLibs Oct 28, 2021
Upstream Cmake docs specify that PythonInterp should be called before
PythonLibs[1].  In some environments, inconsistency is possible when called
out of order.

[1] https://cmake.org/cmake/help/latest/module/FindPythonInterp.html
@mlschroe
Copy link
Member

mlschroe commented Feb 1, 2022

Don't you also need to adjust the first lines of the cmake file, so that you get python2 if both python2 and python3 are to be built?

@markmcclain
Copy link
Author

Python2 + Python3 works correctly. The problem is reproducible if python3.y and python3.y+n interpreters are available on the system.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants